﻿/*----------------------------------------------------------------
* 项目名称 ：EMSH
* 类 名 称 ：ReddotGraphView
* 类 描 述 ：红点插件IDE
* 作    者 ：Xu Donghao
* 创建时间 ：2023/2/22/周三 上午 11:22:03
* CLR 版本 ：4.0.30319.42000
* 版 本 号 ：v1.0.0.0
*******************************************************************
* Copyright @ Xu Donghao 2023. All rights reserved.
*******************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor.Experimental.GraphView;
using UnityEngine;


/// <summary>
/// 红点插件IDE
/// </summary>
public class ReddotGraphView : GraphView
{


    public ReddotGraphView()
    {
        //AddStyleSheetPath("Assets/Editor/Reddot/Resources/ReddotGraph");

        SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale);

        AddManipulator(new ContentDragger());
        AddManipulator(new SelectionDragger());
        AddManipulator(new RectangleSelector());


    }

    //private GraphViewChange OnChanged(GraphViewChange graphViewChange)
    //{
    //    var a = new ContentDragger();
    //    a.target = this;
        
    //    return graphViewChange;
    //}

    private void LoadStyle(string path)
    {
        //StyleSheet styleSheet = Resources.Load<StyleSheet>(path);
        //if ((UnityEngine.Object)styleSheet == (UnityEngine.Object)null)
        //    Debug.LogWarning((object)string.Format("Style sheet not found for path \"{0}\"", (object)sheetPath));
        //else
        //    styleSheets.Add(styleSheet);
    }
}